package com.springboot.show_web.filter;

import javax.servlet.*;
import java.io.IOException;

/**
 * Created by yaosheng on 2019/11/9.
 * Filter的注册类
 */
public class MyFilter implements Filter {
    @Override
    public void init(FilterConfig filterConfig) throws ServletException {

    }

    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        System.out.println ("MyFilter process ...");
        filterChain.doFilter (servletRequest, servletResponse);
    }

    @Override
    public void destroy() {

    }
}